<?php
// no direct access
defined ( '_JEXEC' ) or die( 'Restricted access' );


// grab the video list, desired width and height
$vids = $params->get('list');
$width 	= str_replace('px','',$params->get('width','100%'));
$height = str_replace('px','',$params->get('height','auto'));

// get a random video from the list
$thisVid = modSimpleYoutubeList::getOne($vids);

?>
<object width="<?php echo $width;?>" height="<?php echo $height;?>"><param name="movie" value="http://www.youtube.com/v/<?php echo $thisVid;?>?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/<?php echo $thisVid;?>?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="<?php echo $width;?>" height="<?php echo $height;?>"></embed></object>
